package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {

    @MapKey("jobName")
    List<Map> empCount();

    @MapKey("name")
    List<Map> genderCount();

    @Select("select  * from emp where username = #{username} and password = #{password}")
    Emp logList(@Param("username") String username, @Param("password") String password);


    @Select("select image from emp WHERE image LIKE 'https://dcmmtlias.oss-cn-beijing.aliyuncs.com/%'")
    List<String> selectImage();


}
